'''
@Project ：fastApiProject 
@File    ：result.py
@IDE     ：PyCharm 
@Author  ：xzy
@Date    ：2024/11/22 10:30 
@explain: 
'''
from pydantic import BaseModel
class Result(BaseModel):

    code:int
    message:str
    data:dict = {}

    def to_dict(self):
        return {
            "code": self.code,
            "message": self.message,
            "data": self.data
        }